package eco2automotive.gui.components;
import java.awt.*;
import javax.swing.*;

/** 
 *  JPanel, display the KMH and RPM information
  * @version 1.0
  * @autor Fco. Javier Sánchez Esparza
 */

public class Panel_KMHRPM extends JPanel {
    
    JTextField kmh; 
    JTextField rpm;
    
    /**
     * 
     */
    public Panel_KMHRPM(){
     setBorder(new javax.swing.border.TitledBorder("Monitor Km/h - R.P.M."));
     this.setLayout (new GridLayout(2,2,2,2));
     this.add(new JLabel("R.P.M."));
     this.add(rpm=new JTextField(20));
     this.add(new JLabel("Km/h"));
     this.add(kmh=new JTextField(20));     
    }
    /**
     * 
     * @param s
     */
    public void updateRPM(String s){this.rpm.setText(s);}
    /**
     * 
     * @param s
     */
    public void updateKMH(String s){this.kmh.setText(s);}
}
